package chapter04.example24;
public class example24 {
    public static void main(String[] args) {
        try {
            int res = divide(4, 0); //调用divide()方法
            System.out.println(res);
        } catch (Exception e) {
            System.out.println(e.getMessage());
            e.printStackTrace();
        }finally {
            System.out.println("释放一些资源");
        }
    }
    public static int divide(int x,int y){
        return  x/y;
}
}